//
//  HNActorInfoCache.h
//  HeroNuts
//
//  Created by Magic on 4/4/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>

/** Singleton that handles the loading of the actor info.
 It saves in a cache the actor info.
 Such as actor health, attack, defense, etc.
 */
@interface HNActorInfoCache : NSObject {
	NSMutableArray *actorInfo_;
}



/** Retruns the shared instance of the Actor Info cache. */
+ (HNActorInfoCache*)sharedActorInfoCache;

/** Adds multiple Actor Info from a plist file. */
- (void)addActorInfoWithFile:(NSString*)file;

/** Returns an Actor Info dictionary that was previously added.
 If the name is not found it will return nil.
 You should retain the returned copy if you are going to use it.
 */
- (NSDictionary*)actorInfoByName:(NSString*)name;

- (CGPoint)originalPositionByActor:(NSString*)name;
- (CGFloat)faceLeftOffsetXByActor:(NSString*)name;
- (NSArray*)actionFramesByName:(NSString*)action actor:(NSString*)actor;
- (CGFloat)frameDelayByActor:(NSString*)actor;
- (CGPoint)troopCountOffsetByActor:(NSString*)actor;

/** Purges the cache. It releases all the Actor Info and the retained instance. */
+(void) purgeSharedActorInfoCache;

@end
